//
// Created by Administrator on 2023/11/24.
//
#include "bits/stdc++.h"

using namespace std;

int main() {
    string s;
    getline(cin, s);
    map<string, int> mp;
    for (int i = 0; i < s.size(); ++i) {
        int j = i;
        string t = "";
        while (s[j] != ' ' && s[j] != ',' && s[j] != '.'&&j<s.size()) {
            t += tolower(s[j]);
            j++;
        }
        if (!t.empty()) mp[t]++;
        i = j ;
    }
    for (auto &[i, j]: mp) {
        cout << i << ":" << j << endl;
    }
}